package com.ruoyi.sale.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.Date;

/**
 * 销售计划审核流程表
 *
 */
@AllArgsConstructor
@Data
@TableName(value="tb_plan_process")
public class PlanProcess
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId(value = "plan_process_id")
    private String planProcessId;

    /** 审核流程状态（0审核中，1同意，2拒绝）*/
    @TableField("plan_process_status")
    private String planProcessStatus;

    /** 审核时间 */
    @TableField("plan_process_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date planProcessTime;

    /** 审核流程备注 */
    @TableField("plan_process_remark")
    private String planProcessRemark;

    /** 申请付款ID */
    @TableField("plan_id")
    private Long planId;

    /** 审核人ID */
    @TableField("reviewer_id")
    private Long reviewerId;

    /** 审核人部门ID */
    @TableField("reviewer_dept_id")
    private Long reviewerDeptId;

    /** 审核人角色ID */
    @TableField("reviewer_role_id")
    private Long reviewerRoleId;

    /** 审核人顺序 */
    @TableField("reviewer_order")
    private Integer reviewerOrder;

    public PlanProcess(String planProcessId, String planProcessStatus, Long planId, Long reviewerId,
                       Long reviewerDeptId, Long reviewerRoleId, Integer reviewerOrder) {
        this.planProcessId = planProcessId;
        this.planProcessStatus = planProcessStatus;
        this.planId = planId;
        this.reviewerId = reviewerId;
        this.reviewerDeptId = reviewerDeptId;
        this.reviewerRoleId = reviewerRoleId;
        this.reviewerOrder = reviewerOrder;
    }

    public PlanProcess() {} // 无参构造函数
}
